<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('教材')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-book_id" data-rule="required" min="0" data-source="book/index" data-field="title" class="form-control selectpage" name="row[book_id]" type="text" value="{$row.book_id|htmlentities}">
        </div>
    </div>
<!--    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Upid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-upid" data-rule="required" class="form-control" name="row[upid]" type="number" value="{$row.upid|htmlentities}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Subtitle')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-subtitle" data-rule="required" class="form-control" name="row[subtitle]" type="text" value="{$row.subtitle|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-description" class="form-control" name="row[description]" type="text" value="{$row.description|htmlentities}">
        </div>
    </div>
	<div class=" form-group">
		<label for="c-intro" class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
		<div class="col-xs-12 col-sm-8">
			<textarea id="c-intro" class="form-control editor" name="row[intro]">{$row.intro|htmlentities}</textarea>
		</div>
	</div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

	<div class="row">
        <div class="panel panel-default panel-intro col-xs-12 col-md-12">
            <div class="panel-heading">
                <div class="panel-lead"><em>{:__('附件')}</em></div>
            </div>
            <div class="panel-body">
                <div id="toolbar" class="toolbar">
                    {:build_toolbar('refresh')}
                    <input type="hidden" id="c-third" value="">
                    <button type="button" id="faupload-third" class="btn btn-danger faupload {:$auth->check('book.files/add')?'':'hide'}" data-multiple="true" data-input-id="c-third" ><i class="fa fa-upload"></i> {:__('上传')}</button>
					<button type="button" id="fachoose-attachfile" class="btn btn-primary fachoose" data-input-id="c-third" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button>
                </div>
                <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                       data-operate-filesdel="{:$auth->check('book.files/del')}"
                       width="100%">
                </table>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
<script>
	const unit_id = {$row.id}
</script>